package com.push.web.controller;

import com.push.common.annotation.Log;
import com.push.common.core.controller.BaseController;
import com.push.common.core.domain.AjaxResult;
import com.push.common.enums.BusinessType;
import com.push.web.service.IBizAIAssistantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Lookup;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;

@RestController
@RequestMapping("/information/assistent")
public class BizAIAssistantController extends BaseController {
    @Autowired
    private IBizAIAssistantService aiAssistantService;

    @PreAuthorize("@ss.hasPermi('information:assistant:extract')")
    @Log(title = "信息抽取", businessType = BusinessType.OTHER)
    @PostMapping("/extractInfo")
    public AjaxResult extractInfo(@RequestBody JSONObject jsonObject){
        return AjaxResult.success(aiAssistantService.extractInfo(jsonObject));
    }
}
